import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_module/common/base/base_page.dart';
import 'package:flutter_module/style/colors.dart';

/// Create by kyluzoi
/// Date: 2021-08-23
///
/// Description:

class ServiceObjContainer extends BaseStatelessWidget {
  final TextStyle? contentTextStyle;
  final List<String>? datas;

  ServiceObjContainer({Key? key, this.contentTextStyle, this.datas})
      : super(key: key);

  @override
  Widget createView(BuildContext context) {
    return Wrap(
      children: [
        if (this.datas != null)
          for (String data in datas!)
            Container(
              width: 54,
              height: 24,
              alignment: Alignment.topCenter,
              margin: EdgeInsets.only(right: 11),
              child: Text(
                data,
                style: contentTextStyle,
              ),
              decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(3),
                  border: Border.all(color: ThemeColors.grayE5E5E5, width: 1)),
            ),
      ],
    );
  }
}
